home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Macromedia Multimedia Showcase 5.1
/
Macromedia - Multimedia Showcase 5.1 (Macromedia) (1996).ISO
/
pc
/
media
/
shared.dir
/
02000_Script_authoring routines
next >
Wrap
Text File
|
1996-03-28
|
6KB
|
200 lines
-- AUT: AUTHORING TOOLS SCRIPT
on InitAuthoringTools
if the optionDown then
-- put #InitAuthoringTools
-- installMenu cast "Authoring Menu"
set toolsFileName = the pathName & "XAUTH_02.DIR"
OpenMIAW(toolsFileName)
end if
end InitAuthoringTools
--
on DisposeAuthoringTools
CloseMIAW()
put #DisposeAuthoringTools
end DisposeAuthoringTools
--
on OpenMIAW whichFile
-- put #OpenMIAW
global gWindowObj, gExtWindowFileName
if objectP(gWindowObj) then
forget gWindowObj
end if
if objectP( movieFile ) then movieFile( mDispose )
if voidP(whichFile) then
put FileIO( mNew, "?read", "MV93" ) into movieFile
if movieFile = -43 then
set errMsg = "No authoring tools file specified." & return & return & "Halting program."
HaltProgram(errMsg)
end if
put movieFile( mFileName ) into gExtWindowFileName
else
set gExtWindowFileName = whichFile
-- if voidP(gExtWindowFileName) then
-- set errMsg = "Authoring Tools not found." & return & return & "Exiting program."
-- HaltProgram(errMsg)
-- end if
end if
set myWindowWidth = 400
set myWindowHeigth = 230
set horzOrigin = 828 - myWindowWidth
set vertOrigin = the stageTop+20
set myWindowRect to rect(horzOrigin, vertOrigin, ¼
horzOrigin + myWindowWidth, vertOrigin + myWindowHeigth)
set gWindowObj to window gExtWindowFileName
set the rect of gWindowObj to myWindowRect
set the fileName of gWindowObj to gExtWindowFileName
set the title of gWindowObj = "Xronos Authoring Tools"
set the titleVisible of gWindowObj to TRUE
open gWindowObj
moveToBack window gExtWindowFileName
end OpenMIAW
--
on HaltProgram whichMsg
if voidP(whichMsg) then
set whichMsg = "Unknown error. Halting program."
end if
alert whichMsg
halt
end HaltProgram
--
on CloseMIAW
global gWindowObj
if objectP(gWindowObj) then
forget gWindowObj
end if
end
--
on PurgeQuick startCast, endCast
repeat with i = startCast to endCast
set the purgePriority of cast i = 2 -- purge "first", or "next"
end repeat
put #done
end PurgeQuick
--
on CheckBitDepth lastCast
-- if voidP(lastCast) then
-- alert "enter last cast you want to check"
-- halt
-- end if
set lastCast = the number of castmembers
repeat with i = 1 to lastCast
if (the castType of cast i = #bitmap) then
set myDepth = the depth of cast i
if myDepth > 8 then
put #cast && i && #bitdepth && myDepth
end if
end if
end repeat
put #checked && lastCast && #castmembers
end CheckBitDepth
--
on testAnimList
global gNavObj, gAnimationScreenList
repeat with i = 0 to 120
findPosNear gAnimationScreenList, i
set myPos = the result
set myLast = count(gAnimationScreenList)
if myPos > myLast then
set myPos = myLast
end if
getAt gAnimationScreenList, myPos
set myScene = the result
put i && myScene
JumpSequence(myScene)
end repeat
end testAnimList
--
on GetLinksAndScenes
-- for test purposes only; creates a list of all links and their director fiile name
global castIdPtr, sBirthPtr
set myNavList = value(the text of field "Compiled*Navigation*List") -- I bet this no longer works
set myEventList = value(the text of field "Compiled*Event*List")
set myLast = count(myEventList)
repeat with i = 1 to myLast
getAt myEventList, i
set myEvents = the result
repeat with j = 1 to count(myEvents)
getAt myEvents, j
set curEvent = the result
if item castIdPtr of curEvent contains "L" then
set myScene = item sBirthPtr of curEvent
getProp myNavList, myScene
set sceneData = the result
set DirFile = item 4 of sceneData & ".DIR"
put DirFile & " contains" && item castIdPtr of curEvent
end if
end repeat
end repeat
end GetLinksAndScenes
--
on parseATPtext
-- Specific routine to take the ATP database (training providers) and turn it into a list
-- structure. Database was changed from tab-delimited to '%' delimited, copied into
-- a text castmember ('ATP text') then parsed. The resulting list was saved into
-- a different text cast member ('ATP list').
-- The records get sorted into the list by phone prefix.
set theText = the text of field "ATP text"
set destinationList = [ : ]
set currentPrefix = 0
set thisPrefixList = [ ]
set oldDelimiter = the itemDelimiter
set the itemDelimiter = "%"
set prefixItemNum = 5
repeat with aLine = 1 to the number of lines of theText
set tempLine = line aLine of theText
set tempPrefix = item(prefixItemNum) of tempLine
set thisItemList = [ ]
repeat with anItem = 1 to the number of items of tempLine
set tempItem = item anItem of tempLine
append(thisItemList, tempItem)
end repeat
if tempPrefix = currentPrefix then
append(thisPrefixList, thisItemList)
else
-- starting a new prefix
if count(thisPrefixList) > 0 then
-- done with last prefix, add its list to the main list
addProp (destinationList, currentPrefix, thisPrefixList)
end if
set currentPrefix = tempPrefix
set thisPrefixList = [ thisItemList ]
end if
end repeat
if count(thisPrefixList) > 0 then
addProp (destinationList, currentPrefix, thisPrefixList)
end if
put destinationList into field "ATP List"
set the itemDelimiter = oldDelimiter
end parseATPtext
--
on mouseDown
global lastMouseEvent
set lastMouseEvent = the ticks
pass
end mouseDown